<%@taglib uri="/struts-tags" prefix="s"%>

<div id="contenttab">
    <h2>//nameClass_plural// Index</h2>
    <a class="icon icon-add" href="<s:url action="//link//add" ></s:url>">Add //nameClass_plural//</a>

    <div class="autoscroll">
        <table class="list issues">
            <thead>
                <tr>
                    <th>ID</th>//th_attrs//<th></th>
                </tr>
            </thead>
            <tbody>
                <s:if test="//nameclass_plural//.size() > 0">
                    <s:iterator value="%{//nameclass_plural//}" status="rowstatus">
                        <s:if test="#rowstatus.odd == true">
                            <tr class="file odd">
                        </s:if>
                        <s:else>
                            <tr class="file even">
                        </s:else>
                                <td><s:property value="id" /></td>                                
//td_attrs//
                                <td><a class="icon icon-edit" href="<s:url action="//link//edit" ><s:param name="id" value="%{id}"></s:param></s:url>">Edit</a>
                                    <a class="icon icon-delete" onclick="return confirm('Are you sure you want to delete this record')" href="<s:url action="//link//delete" ><s:param name="id" value="%{id}"></s:param></s:url>">Delete</a></td>
                            </tr>
                    </s:iterator>
                </s:if>
            </tbody>  
        </table>
    </div>
    <s:iterator  id="psg" value="pagination">
        <s:if test="#psg.selected == 'true'">
            <strong><a href="<s:url action="//link//index" ><s:param name="page_number" value="%{name}"></s:param></s:url>"><s:property value="name" /></a></strong>
        </s:if>
        <s:else>
            <a href="<s:url action="//link//index" ><s:param name="page_number" value="%{name}"></s:param></s:url>"><s:property value="name" /></a>
        </s:else>
    </s:iterator>
</div>